﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bungalow.Concept
{
    /// <summary>
    /// An endpoint is a part of a concept where information is exchanged, for example returning a list of activities etc.
    /// </summary>
    public class Endpoint
    {
        private Concept mConcept;
        public Endpoint(Concept concept)
        {
            this.mConcept = concept;
        }
        /// <summary>
        /// Read object from the endpoint with the specified URI
        /// </summary>
        /// <param name="uri">The URI</param>
        /// <param name="parameters">The parameters</param>
        /// <returns></returns>
        public Object read(Uri uri, Dictionary<String, String> querystrings, params Object[] data)
        {
            return  mConcept.Engine.action(uri, querystrings);

        }
        /// <summary>
        /// Write to the endpoint
        /// </summary>
        /// <param name="uri">Refer</param>
        /// <param name="data">Data to write</param>
        /// <returns></returns> 
        public Object write(Uri uri, Dictionary<String, String> querystrings, params Object[] data)
        {
            return null;
        }
    }
}
